package com.faceye.test.util;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@RunWith(JUnit4.class)
@Slf4j
public class LombokToStringTestCase {
    LombokObject lo = null;

    @Before
    public void setUp() throws Exception {
        List<String> list = new ArrayList();
        list.add("List-x");
        lo = new LombokObject();
        lo.setApplyId("apply-id");
        lo.setArchiverName("archiver.name");
//        lo.setArriveTime(new Date());
        lo.setConfirmStatus(1);
        lo.setFileNo(null);
        lo.setNodeList(list);
        lo.setHlr("");
        lo.setPageSize(0);
        lo.setTypeName(null);
    }
    @After
    public void tearDown() throws Exception {
        lo = null;
    }
    @Test
    public void testLombokToString() throws Exception {
        String res =lo.toString();
        log.info("res:{}",res);
//        res ="tst";
        res =MD5Util.getMD5Sign(res);
        log.info("res md5 :{}",res);
        Assert.assertTrue(StringUtils.isNotEmpty(res));
    }
}
